{template "content","header"}
	<div class="main">
		<div class="wrapper bg">
			<div class="pp_nav">
				<div class="txt"></div>
				<div class="logo">
					<ul class="p_pic">
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
						<li><a href="#"><img src="{IMG_PATH}p_pic.jpg"></a></li>
					</ul>
					<ul class="p_txt">
					{pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}
						{loop $data $r}
						<li><a href="{$r[url]}">{$r[catname]}</a></li>
						{/loop}
					{/pc}
					</ul>
				</div>
			</div>
			<div class="pp_hot">
				<div class="tit"><h2 class="color">热门机型</h2><img src="{IMG_PATH}crow_list.gif"/><span>{$CAT[catname]}</span></div>
				<div class="box">
					<ul>
					{loop subcat($catid,0) $r}
						<li>
							<div class="img"><a href="{$r[url]}"><img src="{thumb($r[image],90,0)}" title="{$r[catname]}"/></a></div>
							<div class="desc">
								<h3><a href="{$r[url]}">{$r[catname]}</a></h3>
								<div class="num">
								{pc:get sql="SELECT count(1) as roms,catid FROM romzj_download WHERE catid = $r[catid]" return="data"}
								<p>ROM ：<span><?php 
                          	if(!empty($data)){
                          		echo $data[0][roms];
                            }else{
                            	echo 0;
                            }
                          ?></span></p>
								{/pc}
								<?php 
                        	$name = $data[0];
                        	if(!empty($name[catid])){
                        ?>
                        {pc:get sql="SELECT sum(views) as views FROM romzj_hits WHERE catid = $name[catid]" return="data"}
								<p>下载：<span>{$data[0][views]}</span></p>
								{/pc}
								<?php }else{?>
                          <p>下载: <span>0</span></p>
                        <?php } ?>
								</div>
							</div>
						</li>
					{/loop}
						
						<li>
							<div class="img"><a href="/index.php?m=formguide&c=index&a=show&formid=13&siteid=1"><img src="{IMG_PATH}phone.gif"/></a></div>
							<div class="desc">
								<h3><a href="/index.php?m=formguide&c=index&a=show&formid=13&siteid=1">找不到你想要的机型？<br />
                                                  那告诉我们吧！</a></h3>
							</div>
						</li>
					</ul>
				</div>
				<div class="showMore">
					<a href="#"><img src="{IMG_PATH}more.jpg"/></a>
				</div>
			</div>
		</div>
	</div>
{template "content","footer"}
</body>
</html>
